package com.fishingwithme.infrastructure.dtos;

import com.fishingwithme.domain.spots.HarvestType;
import com.fishingwithme.infrastructure.utils.CommonUtils;
import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.Data;

import java.sql.Timestamp;
import java.util.List;

@Data
public class SpotVisitHisDto {

    private String harvest;

    private HarvestType harvestType;

    private Boolean isRec;

    private Integer score;

    private Timestamp fishingAt;
    @JsonProperty
    private String hisPictures;

    private List<String> jsonHisPictures;
    private String fisherName;
    private String avatarUrl;

    private String comment;


    public SpotVisitHisDto format() {
        this.setJsonHisPictures(CommonUtils.convert(this.getHisPictures(), String.class));
        return this;
    }


}
